package controllers

import (
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/logs"
	//"github.com/astaxie/beego/orm"
	//"fmt"
)

type MainController struct {
	beego.Controller
}

func (c *MainController) Get() {
	/*c.Data["Website"] = "beego.me"
	c.Data["Email"] = "astaxie@gmail.com"

	o := orm.NewOrm()
	user := User{Id: 1}

	err := o.Read(&user)

	if err == orm.ErrNoRows {
		fmt.Println("查询不到")
	} else if err == orm.ErrMissPK {
		fmt.Println("找不到主键")
	} else {
		fmt.Println(user.Id, user.Name)
	}

	c.Ctx.Output.Body([]byte("hello world"))*/
	//c.TplName = "index.tpl"
}


func (this *MainController) Post() {
	logs.Debug("this is a debug message")
	this.Ctx.Output.Body([]byte("hello world"))

	return
}

